//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class AlphaModulateEffect : Effect
    {
        private EffectContainer effectContainer;

        public EffectContainer EffectContainer
        {
            get { return effectContainer; }
            set { effectContainer = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("alphaMod"))
            {
                EffectContainer = c.ReadElement<EffectContainer>();
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("alphaMod"))
            {
                c.WriteElement(EffectContainer);
            }
        }
    }
}